﻿using System;
namespace yq.ICache
{
    public interface IClient<T> where T : class
    {
        bool HashRefreshDelete(string fullname);

        bool HashRefreshDelete(string fullname,string key);

        void HashRefreshLoad(string fullname, string key, object value);

        bool HashContains(string key);
        System.Collections.Generic.IList<T> HGet(System.Collections.Generic.IList<string> keys);
        T HGet(string key);
        System.Collections.Generic.IList<T> HGet(string[] keys);
        System.Collections.Generic.Dictionary<string, T> HGetAll();
        System.Collections.Generic.IList<string> HGetAllKeys();
        System.Collections.Generic.IList<T> HGetAllValues();
        int HGetCount();
        void HRemove(System.Collections.Generic.IList<string> keys);
        bool HRemove(string key);
        bool HRemoveAll();
        void HSet(System.Collections.Generic.Dictionary<string, string> dics);
        void HSet(System.Collections.Generic.Dictionary<string, T> values);
        void HSet(System.Collections.Generic.IList<string> keys, System.Collections.Generic.IList<T> values);
        bool HSet(string key, T value);
        bool HSetIfNotExists(string key, T value);
        System.Collections.Generic.Dictionary<string, T> KGet(System.Collections.Generic.IList<string> keys);
        T KGet(string key);
        System.Collections.Generic.IList<T> KGetList(System.Collections.Generic.IList<string> keys);
        void KRemove(System.Collections.Generic.IList<string> keys);
        bool KRemove(string key);
        System.Collections.Generic.IList<string> KSearchKeys(string pattern);
        System.Collections.Generic.IList<T> KSearchValues(string pattern);
        void KSet(System.Collections.Generic.Dictionary<string, T> value);
        bool KSet(string key, T value);
        bool KSet(string key, T value, DateTime expiresTime);
        bool KSet(string key, T value, TimeSpan expiresIn);
    }
}
